StringScanner.ScanToWhitespace Function

Syntax

Text as C = ScanToWhitespace as C()

Arguments

Text

The text between the starting and ending offset positions.

Description

Skip until a whitespace characters is encountered. Return text we scanned over.

Discussion

The <StringScanner>.ScanToWhitespace() function moves the offset to the next white space character and returns the text between the starting and ending positions of the offset. The function treats the following characters as white space.

Character
ASCII Value
space

chr(32)

tab

chr(9)

carriage return

chr(10)

line feed

chr(13)

Example

dim scanner as P
dim txt as C
txt = <<%text%
This is wonderful prose written
by a technical writer of great merit.
%text%
scanner = stringscanner.create(txt)
? scanner.ScanToWhitespace()
= "This"
? scanner.GetToOffset()
= "This"
? scanner.getremainder()
=is wonderful prose written
by a technical writer of great merit.

See Also